package com.netposa.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.netposa.condition.PoliceCondition;
import com.netposa.mapper.db0.PoliceMapper;
import com.netposa.service.PoliceService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PoliceServiceImpl implements PoliceService {
   @Autowired
   private PoliceMapper policeMapper;

   public PageInfo getPoliceInfo(PoliceCondition condition) {
      PageHelper.startPage(condition.getCurrentPage(), condition.getPageSize());
      List policeList = this.policeMapper.getPoliceInfo(condition);
      PageInfo pageInfo = new PageInfo(policeList);
      return pageInfo;
   }
}
